package com.health.platform.provider.diseasemonitoring.controller;

import com.health.platform.common.restful.AppResponse;
import com.health.platform.provider.diseasemonitoring.entity.DiseaseEntity;
import com.health.platform.provider.diseasemonitoring.entity.InfectionEntity;
import com.health.platform.provider.diseasemonitoring.service.InfectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>病症监控-传染病监控预警_地方Controller</p>
 * <p>创建日期：2021-02-27</p>
 *
 * @author wangyanlei
 */
@RestController
@RequestMapping("/diseaseMonitoring")
public class InfectionController {

    @Autowired
    private InfectionService infectionService;

    /**
     * 获取数值类的信息
     *
     * @param infectionEntity 参数
     * @return 结果
     */
    @RequestMapping("/getPersonTotal")
    public AppResponse getPersonTotal(@RequestBody InfectionEntity infectionEntity) {
        return infectionService.getPersonTotal(infectionEntity);
    }

    /**
     * 获取图表类的信息
     *
     * @param infectionEntity 参数
     * @return 结果
     */
    @RequestMapping("/getEchartsData")
    public AppResponse getEchartsData(@RequestBody InfectionEntity infectionEntity) {
        return infectionService.getEchartsData(infectionEntity);
    }
    /**
     * 获取折线图信息
     *
     * @param infectionEntity 参数
     * @return 结果
     */
    @RequestMapping("/getLineChart")
    public AppResponse getLineChart(@RequestBody InfectionEntity infectionEntity) {
        return infectionService.getLineChart(infectionEntity);
    }
    /**
     * 查询码表
     *
     * @param
     * @return 结果
     * @author shi_xy_sr@neusiri.com
     * @date 2021/3/4 17:22
     */
    @RequestMapping("/getDict")
    public AppResponse getDict() {
        return infectionService.getDict();
    }
    /**
     * 获取当前传染病预警信息
     *
     * @param
     * @return 结果
     * @author shi_xy_sr@neusiri.com
     * @date 2021/3/5 11:04
     */
    @RequestMapping("/getWarning")
    public AppResponse getWarning(@RequestBody DiseaseEntity diseaseEntity) {
        return infectionService.getWarning(diseaseEntity);
    }
    /**
     * 获取历史传染病预警信息
     *
     * @param
     * @return 结果
     * @author shi_xy_sr@neusiri.com
     * @date 2021/3/12 9:02
     */
    @RequestMapping("/getWarningHistory")
    public AppResponse getWarningHistory(@RequestBody DiseaseEntity diseaseEntity) {
        return infectionService.getWarningHistory(diseaseEntity);
    }
    /**
     * 更新预警信息为已查看
     *
     * @param
     * @return 结果
     * @author shi_xy_sr@neusiri.com
     * @date 2021/3/12 9:04
     */
    @RequestMapping("/lookWarning")
    public AppResponse lookWarning(@RequestBody DiseaseEntity diseaseEntity) {
        return infectionService.lookWarning(diseaseEntity);
    }

}
